package com.xbongbong.pro.message.enums;/*/*/

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Description:推送类型优先级枚举
 * @author 魏荣杰
 * @date 2018/8/22 14:05
 * @version v3.28
 * @since v3.28
 * Modified by:
 */
public enum PushTypeLevelEnum {

    /**
     * level 1
     */
    CUSTOMER_PUSH(1, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_PUSH.getCode(), PushTypeEnum.CUSTOMER_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_PUSH.getName(), PushTypeEnum.CUSTOMER_PUSH.getAlias()),
    CUSTOMER_ADD_PUSH(1, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_ADD_PUSH.getCode(), PushTypeEnum.CUSTOMER_ADD_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_ADD_PUSH.getName(), PushTypeEnum.CUSTOMER_ADD_PUSH.getAlias()),
    CUSTOMER_CHANGE_PUSH(1, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_CHANGE_PUSH.getCode(), PushTypeEnum.CUSTOMER_CHANGE_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_CHANGE_PUSH.getName(), PushTypeEnum.CUSTOMER_CHANGE_PUSH.getAlias()),
    CUSTOMER_HANDOVER_PUSH(1, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_HANDOVER_PUSH.getCode(), PushTypeEnum.CUSTOMER_HANDOVER_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_HANDOVER_PUSH.getName(), PushTypeEnum.CUSTOMER_HANDOVER_PUSH.getAlias()),
    CUSTOMER_DISTRIBUTION_PUSH(1, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_DISTRIBUTION_PUSH.getCode(), PushTypeEnum.CUSTOMER_DISTRIBUTION_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_DISTRIBUTION_PUSH.getName(), PushTypeEnum.CUSTOMER_DISTRIBUTION_PUSH.getAlias()),

    COMMUNICATE_PLAN_PUSH(1, RefEntityEnum.COMMUNICATE_PLAN_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_PLAN_PUSH.getCode(), PushTypeEnum.COMMUNICATE_PLAN_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_PLAN_PUSH.getName(), PushTypeEnum.COMMUNICATE_PLAN_PUSH.getAlias()),
    COMMUNICATE_PLAN_ADD_PUSH(1, RefEntityEnum.COMMUNICATE_PLAN_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_PLAN_ADD_PUSH.getCode(), PushTypeEnum.COMMUNICATE_PLAN_ADD_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_PLAN_ADD_PUSH.getName(), PushTypeEnum.COMMUNICATE_PLAN_ADD_PUSH.getAlias()),
    COMMUNICATE_PUSH(1, RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_PUSH.getCode(), PushTypeEnum.COMMUNICATE_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_PUSH.getName(), PushTypeEnum.COMMUNICATE_PUSH.getAlias()),
    COMMUNICATE_ADD_PUSH(1, RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_ADD_PUSH.getCode(), PushTypeEnum.COMMUNICATE_ADD_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_ADD_PUSH.getName(), PushTypeEnum.COMMUNICATE_ADD_PUSH.getAlias()),
    COMMUNICATE_LIKE_PUSH(1, RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_LIKE_PUSH.getCode(), PushTypeEnum.COMMUNICATE_LIKE_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_LIKE_PUSH.getName(), PushTypeEnum.COMMUNICATE_LIKE_PUSH.getAlias()),
    COMMUNICATE_COMMENT_PUSH(1, RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_COMMENT_PUSH.getCode(), PushTypeEnum.COMMUNICATE_COMMENT_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_COMMENT_PUSH.getName(), PushTypeEnum.COMMUNICATE_COMMENT_PUSH.getAlias()),
    COMMUNICATE_REPLY_PUSH(1, RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_REPLY_PUSH.getCode(), PushTypeEnum.COMMUNICATE_REPLY_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_REPLY_PUSH.getName(), PushTypeEnum.COMMUNICATE_REPLY_PUSH.getAlias()),
    COMMUNICATE_COMMENT_DEL_PUSH(1,RefEntityEnum.CUSTOMER_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.COMMUNICATE_COMMENT_DEL_PUSH.getCode(), PushTypeEnum.COMMUNICATE_COMMENT_DEL_PUSH.getSubCode(), PushTypeEnum.COMMUNICATE_COMMENT_DEL_PUSH.getName(), PushTypeEnum.COMMUNICATE_COMMENT_DEL_PUSH.getAlias()),

    CONTRACT_REMIND(1, RefEntityEnum.CONTRACT_ENTITY.getCode(), PushTypeEnum.CONTRACT_REMIND.getCode(), PushTypeEnum.CONTRACT_REMIND.getSubCode(), PushTypeEnum.CONTRACT_REMIND.getName(), PushTypeEnum.CONTRACT_REMIND.getAlias()),

    APPROVAL_PUSH(1, RefEntityEnum.APPROVAL_ENTITY.getCode(), PushTypeEnum.APPROVAL_PUSH.getCode(), PushTypeEnum.APPROVAL_PUSH.getSubCode(), PushTypeEnum.APPROVAL_PUSH.getName(), PushTypeEnum.APPROVAL_PUSH.getAlias()),
    APPROVAL_ADD_PUSH(1, RefEntityEnum.APPROVAL_ENTITY.getCode(), PushTypeEnum.APPROVAL_ADD_PUSH.getCode(), PushTypeEnum.APPROVAL_ADD_PUSH.getSubCode(), PushTypeEnum.APPROVAL_ADD_PUSH.getName(), PushTypeEnum.APPROVAL_ADD_PUSH.getAlias()),
    APPROVAL_CHANGE_PUSH(1, RefEntityEnum.APPROVAL_ENTITY.getCode(), PushTypeEnum.APPROVAL_CHANGE_PUSH.getCode(), PushTypeEnum.APPROVAL_CHANGE_PUSH.getSubCode(), PushTypeEnum.APPROVAL_CHANGE_PUSH.getName(), PushTypeEnum.APPROVAL_CHANGE_PUSH.getAlias()),

    WORKORDER_PUSH(1, RefEntityEnum.WORKORDER_ENTITY.getCode(), PushTypeEnum.WORKORDER_PUSH.getCode(), PushTypeEnum.WORKORDER_PUSH.getSubCode(), PushTypeEnum.WORKORDER_PUSH.getName(), PushTypeEnum.WORKORDER_PUSH.getAlias()),
    WORKORDER_DEL_PUSH(1, RefEntityEnum.WORKORDER_ENTITY.getCode(), PushTypeEnum.WORKORDER_DEL_PUSH.getCode(), PushTypeEnum.WORKORDER_DEL_PUSH.getSubCode(), PushTypeEnum.WORKORDER_DEL_PUSH.getName(), PushTypeEnum.WORKORDER_DEL_PUSH.getAlias()),
    WORKORDER_DYNAMIC_PUSH(1, RefEntityEnum.WORKORDER_ENTITY.getCode(), PushTypeEnum.WORKORDER_DYNAMIC_PUSH.getCode(), PushTypeEnum.WORKORDER_DYNAMIC_PUSH.getSubCode(), PushTypeEnum.WORKORDER_DYNAMIC_PUSH.getName(), PushTypeEnum.WORKORDER_DYNAMIC_PUSH.getAlias()),
    WORKORDER_DYNAMIC_UPDATE_PUSH(1, RefEntityEnum.WORKORDER_ENTITY.getCode(),PushTypeEnum.WORKORDER_DYNAMIC_UPDATE_PUSH.getCode(), PushTypeEnum.WORKORDER_DYNAMIC_UPDATE_PUSH.getSubCode(), PushTypeEnum.WORKORDER_DYNAMIC_UPDATE_PUSH.getName(), PushTypeEnum.WORKORDER_DYNAMIC_UPDATE_PUSH.getAlias()),
    WORKORDER_DYNAMIC_DEL_PUSH(1,RefEntityEnum.WORKORDER_ENTITY.getCode(),PushTypeEnum.WORKORDER_DYNAMIC_DEL_PUSH.getCode(), PushTypeEnum.WORKORDER_DYNAMIC_DEL_PUSH.getSubCode(), PushTypeEnum.WORKORDER_DYNAMIC_DEL_PUSH.getName(), PushTypeEnum.WORKORDER_DYNAMIC_DEL_PUSH.getAlias()),

    EXPIRED_PUSH(1, RefEntityEnum.SYSTEM_NOTIFICATION_ENTITY.getCode(), PushTypeEnum.EXPIRED_PUSH.getCode(), PushTypeEnum.EXPIRED_PUSH.getSubCode(), PushTypeEnum.EXPIRED_PUSH.getName(), PushTypeEnum.EXPIRED_PUSH.getAlias()),

    EXPORT_PUSH(1, RefEntityEnum.EXPORT.getCode(), PushTypeEnum.EXPORT_PUSH.getCode(), PushTypeEnum.EXPORT_PUSH.getSubCode(), PushTypeEnum.EXPORT_PUSH.getName(), PushTypeEnum.EXPORT_PUSH.getAlias()),
    EXPORT_PUSH_FAIL(1, RefEntityEnum.EXPORT_FAIL.getCode(), PushTypeEnum.EXPORT_PUSH_FAIL.getCode(), PushTypeEnum.EXPORT_PUSH_FAIL.getSubCode(), PushTypeEnum.EXPORT_PUSH_FAIL.getName(), PushTypeEnum.EXPORT_PUSH_FAIL.getAlias()),

    PAYMENT_TASK_PUSH(1, RefEntityEnum.PAYMENT_TASK_ENTITY.getCode(), PushTypeEnum.PAYMENT_TASK_PUSH.getCode(), PushTypeEnum.PAYMENT_TASK_PUSH.getSubCode(), PushTypeEnum.PAYMENT_TASK_PUSH.getName(), PushTypeEnum.PAYMENT_TASK_PUSH.getAlias()),
    PAYMENT_TASK_ADD_PUSH(1, RefEntityEnum.PAYMENT_TASK_ENTITY.getCode(), PushTypeEnum.PAYMENT_TASK_ADD_PUSH.getCode(), PushTypeEnum.PAYMENT_TASK_ADD_PUSH.getSubCode(), PushTypeEnum.PAYMENT_TASK_ADD_PUSH.getName(), PushTypeEnum.PAYMENT_TASK_ADD_PUSH.getAlias()),

    DISTRIBUTOR_COMMUNICATE_PUSH(1, RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_PUSH.getAlias()),
    DISTRIBUTOR_COMMUNICATE_ADD_PUSH(1, RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_ADD_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_ADD_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_ADD_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_ADD_PUSH.getAlias()),
    DISTRIBUTOR_COMMUNICATE_LIKE_PUSH(1, RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_LIKE_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_LIKE_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_LIKE_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_LIKE_PUSH.getAlias()),
    DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH(1, RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH.getAlias()),
    DISTRIBUTOR_COMMUNICATE_REPLY_PUSH(1, RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_REPLY_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_REPLY_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_REPLY_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_REPLY_PUSH.getAlias()),
    DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH(1,RefEntityEnum.DISTRIBUTOR_COMMUNICATE_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH.getAlias()),

    /**
     * level 2
     */

    CUSTOMER_REMIND(2, RefEntityEnum.CUSTOMER_ENTITY.getCode(), PushTypeEnum.CUSTOMER_REMIND.getCode(), PushTypeEnum.CUSTOMER_REMIND.getSubCode(), PushTypeEnum.CUSTOMER_REMIND.getName(), PushTypeEnum.CUSTOMER_REMIND.getAlias()),

    SALE_REPORT_PUSH(2 , RefEntityEnum.SALES_REPORT_ENTITY.getCode(), PushTypeEnum.SALE_REPORT_PUSH.getCode(), PushTypeEnum.SALE_REPORT_PUSH.getSubCode(), PushTypeEnum.SALE_REPORT_PUSH.getName(), PushTypeEnum.SALE_REPORT_PUSH.getAlias()),

    PAYMENT_REMIND(2, RefEntityEnum.PAYMENT_SHEET.getCode(), PushTypeEnum.PAYMENT_REMIND.getCode(), PushTypeEnum.PAYMENT_REMIND.getSubCode(), PushTypeEnum.PAYMENT_REMIND.getName(), PushTypeEnum.PAYMENT_REMIND.getAlias()),
    PAYMENT_PLAN_ADD_PUSH(2, RefEntityEnum.PAYMENT.getCode(), PushTypeEnum.PAYMENT_PLAN_ADD.getCode(), PushTypeEnum.PAYMENT_PLAN_ADD.getSubCode(), PushTypeEnum.PAYMENT_PLAN_ADD.getName(), PushTypeEnum.PAYMENT_PLAN_ADD.getAlias()),
    PAYMENT_SHEET_ADD_PUSH(2, RefEntityEnum.PAYMENT_SHEET.getCode(), PushTypeEnum.PAYMENT_SHEET_ADD.getCode(), PushTypeEnum.PAYMENT_SHEET_ADD.getSubCode(), PushTypeEnum.PAYMENT_SHEET_ADD.getName(), PushTypeEnum.PAYMENT_SHEET_ADD.getAlias()),
    PAYMENT_SHEET_RED_ADD_PUSH(2, RefEntityEnum.RED_PAYMENT_SHEET.getCode(), PushTypeEnum.PAYMENT_SHEET_RED_ADD.getCode(), PushTypeEnum.PAYMENT_SHEET_RED_ADD.getSubCode(), PushTypeEnum.PAYMENT_SHEET_RED_ADD.getName(), PushTypeEnum.PAYMENT_SHEET_RED_ADD.getAlias()),
    PAYMENT_SHEET_BAD_ADD_PUSH(2, RefEntityEnum.BAD_PAYMENT_SHEET.getCode(), PushTypeEnum.PAYMENT_SHEET_BAD_ADD.getCode(), PushTypeEnum.PAYMENT_SHEET_BAD_ADD.getSubCode(), PushTypeEnum.PAYMENT_SHEET_BAD_ADD.getName(), PushTypeEnum.PAYMENT_SHEET_BAD_ADD.getAlias()),
    PAYMENT_SHEET_PREPAYMENT_ADD_PUSH(2, RefEntityEnum.PREPAYMENT.getCode(), PushTypeEnum.PAYMENT_SHEET_PREPAYMENT_ADD.getCode(), PushTypeEnum.PAYMENT_SHEET_PREPAYMENT_ADD.getSubCode(), PushTypeEnum.PAYMENT_SHEET_PREPAYMENT_ADD.getName(), PushTypeEnum.PAYMENT_SHEET_PREPAYMENT_ADD.getAlias()),
    PAYMENT_SHEET_RED_PREPAYMENT_ADD_PUSH(2, RefEntityEnum.RED_PREPAYMENT.getCode(), PushTypeEnum.PAYMENT_SHEET_RED_PREPAYMENT_ADD.getCode(), PushTypeEnum.PAYMENT_SHEET_RED_PREPAYMENT_ADD.getSubCode(), PushTypeEnum.PAYMENT_SHEET_RED_PREPAYMENT_ADD.getName(), PushTypeEnum.PAYMENT_SHEET_RED_PREPAYMENT_ADD.getAlias()),
    PAYMENT_OVERDUE_PUSH(2, RefEntityEnum.PAYMENT_SHEET.getCode(), PushTypeEnum.PAYMENT_OVERDUE.getCode(), PushTypeEnum.PAYMENT_OVERDUE.getSubCode(), PushTypeEnum.PAYMENT_OVERDUE.getName(), PushTypeEnum.PAYMENT_OVERDUE.getAlias()),
    PAY_PLAN_ADD_PUSH(2, RefEntityEnum.PAY_PLAN.getCode(), PushTypeEnum.PAY_PLAN_ADD.getCode(), PushTypeEnum.PAY_PLAN_ADD.getSubCode(), PushTypeEnum.PAY_PLAN_ADD.getName(), PushTypeEnum.PAY_PLAN_ADD.getAlias()),
    PAY_PLAN_OVERDUE_PUSH(2, RefEntityEnum.PAY_PLAN.getCode(), PushTypeEnum.PAY_PLAN_OVERDUE.getCode(), PushTypeEnum.PAY_PLAN_OVERDUE.getSubCode(), PushTypeEnum.PAY_PLAN_OVERDUE.getName(), PushTypeEnum.PAY_PLAN_OVERDUE.getAlias()),
    PAY_PLAN_REMIND(2, RefEntityEnum.PAY_PLAN.getCode(), PushTypeEnum.PAY_PLAN_REMIND.getCode(), PushTypeEnum.PAY_PLAN_REMIND.getSubCode(), PushTypeEnum.PAY_PLAN_REMIND.getName(), PushTypeEnum.PAY_PLAN_REMIND.getAlias()),
    PAY_SHEET_ADD_PUSH(2, RefEntityEnum.PAY_SHEET.getCode(), PushTypeEnum.PAY_SHEET_ADD.getCode(), PushTypeEnum.PAY_SHEET_ADD.getSubCode(), PushTypeEnum.PAY_SHEET_ADD.getName(), PushTypeEnum.PAY_SHEET_ADD.getAlias()),
    PAY_SHEET_RED_ADD_PUSH(2, RefEntityEnum.RED_WRITE_OFF_PAY.getCode(), PushTypeEnum.PAY_SHEET_RED_ADD.getCode(), PushTypeEnum.PAY_SHEET_RED_ADD.getSubCode(), PushTypeEnum.PAY_SHEET_RED_ADD.getName(), PushTypeEnum.PAY_SHEET_RED_ADD.getAlias()),
    PAY_SHEET_BAD_ADD_PUSH(2, RefEntityEnum.BAD_PAY.getCode(), PushTypeEnum.PAY_SHEET_BAD_ADD.getCode(), PushTypeEnum.PAY_SHEET_BAD_ADD.getSubCode(), PushTypeEnum.PAY_SHEET_BAD_ADD.getName(), PushTypeEnum.PAY_SHEET_BAD_ADD.getAlias()),
    PAY_SHEET_PREPAY_ADD_PUSH(2, RefEntityEnum.PREPAY.getCode(), PushTypeEnum.PAY_SHEET_PREPAY_ADD.getCode(), PushTypeEnum.PAY_SHEET_PREPAY_ADD.getSubCode(), PushTypeEnum.PAY_SHEET_PREPAY_ADD.getName(), PushTypeEnum.PAY_SHEET_PREPAY_ADD.getAlias()),
    PAY_SHEET_RED_PREPAY_ADD_PUSH(2, RefEntityEnum.RED_PREPAY.getCode(), PushTypeEnum.PAY_SHEET_RED_PREPAY_ADD.getCode(), PushTypeEnum.PAY_SHEET_RED_PREPAY_ADD.getSubCode(), PushTypeEnum.PAY_SHEET_RED_PREPAY_ADD.getName(), PushTypeEnum.PAY_SHEET_RED_PREPAY_ADD.getAlias()),
    
    /**
     * level 3
     */
    OPPORTUNITY_PUSH(3, RefEntityEnum.SALES_OPPORTUNITY_ENTITY.getCode(), PushTypeEnum.OPPORTUNITY_PUSH.getCode(), PushTypeEnum.OPPORTUNITY_PUSH.getSubCode(), PushTypeEnum.OPPORTUNITY_PUSH.getName(), PushTypeEnum.OPPORTUNITY_PUSH.getAlias()),
    OPPORTUNITY_ADD_PUSH(3, RefEntityEnum.SALES_OPPORTUNITY_ENTITY.getCode(), PushTypeEnum.OPPORTUNITY_ADD_PUSH.getCode(), PushTypeEnum.OPPORTUNITY_ADD_PUSH.getSubCode(), PushTypeEnum.OPPORTUNITY_ADD_PUSH.getName(), PushTypeEnum.OPPORTUNITY_ADD_PUSH.getAlias()),
    OPPORTUNITY_CHANGE_PUSH(3, RefEntityEnum.SALES_OPPORTUNITY_ENTITY.getCode(), PushTypeEnum.OPPORTUNITY_CHANGE_PUSH.getCode(), PushTypeEnum.OPPORTUNITY_CHANGE_PUSH.getSubCode(), PushTypeEnum.OPPORTUNITY_CHANGE_PUSH.getName(), PushTypeEnum.OPPORTUNITY_CHANGE_PUSH.getAlias()),

    CONTRACT_PUSH(3, RefEntityEnum.CONTRACT_ENTITY.getCode(), PushTypeEnum.CONTRACT_PUSH.getCode(), PushTypeEnum.CONTRACT_PUSH.getSubCode(), PushTypeEnum.CONTRACT_PUSH.getName(), PushTypeEnum.CONTRACT_PUSH.getAlias()),
    CONTRACT_ADD_PUSH(3, RefEntityEnum.CONTRACT_ENTITY.getCode(), PushTypeEnum.CONTRACT_ADD_PUSH.getCode(), PushTypeEnum.CONTRACT_ADD_PUSH.getSubCode(), PushTypeEnum.CONTRACT_ADD_PUSH.getName(), PushTypeEnum.CONTRACT_ADD_PUSH.getAlias()),
    CONTRACT_CHANGE_PUSH(3, RefEntityEnum.CONTRACT_ENTITY.getCode(), PushTypeEnum.CONTRACT_CHANGE_PUSH.getCode(), PushTypeEnum.CONTRACT_CHANGE_PUSH.getSubCode(), PushTypeEnum.CONTRACT_CHANGE_PUSH.getName(), PushTypeEnum.CONTRACT_CHANGE_PUSH.getAlias()),

    WORK_REPORT_PUSH(3, RefEntityEnum.WORK_REPORT_ENTITY.getCode(), PushTypeEnum.WORK_REPORT_PUSH.getCode(), PushTypeEnum.WORK_REPORT_PUSH.getSubCode(), PushTypeEnum.WORK_REPORT_PUSH.getName(), PushTypeEnum.WORK_REPORT_PUSH.getAlias()),
    WORK_REPORT_ADD_PUSH(3, RefEntityEnum.WORK_REPORT_ENTITY.getCode(), PushTypeEnum.WORK_REPORT_ADD_PUSH.getCode(), PushTypeEnum.WORK_REPORT_ADD_PUSH.getSubCode(), PushTypeEnum.WORK_REPORT_ADD_PUSH.getName(), PushTypeEnum.WORK_REPORT_ADD_PUSH.getAlias()),
    WORK_REPORT_COMMENT_PUSH(3, RefEntityEnum.WORK_REPORT_ENTITY.getCode(), PushTypeEnum.WORK_REPORT_COMMENT_PUSH.getCode(), PushTypeEnum.WORK_REPORT_COMMENT_PUSH.getSubCode(), PushTypeEnum.WORK_REPORT_COMMENT_PUSH.getName() , PushTypeEnum.WORK_REPORT_COMMENT_PUSH.getAlias()),
    WORK_REPORT_COMMENT_DEL_PUSH(3,RefEntityEnum.WORK_REPORT_ENTITY.getCode(),PushTypeEnum.WORK_REPORT_COMMENT_DEL_PUSH.getCode(), PushTypeEnum.WORK_REPORT_COMMENT_DEL_PUSH.getSubCode(), PushTypeEnum.WORK_REPORT_COMMENT_DEL_PUSH.getName() , PushTypeEnum.WORK_REPORT_COMMENT_DEL_PUSH.getAlias()),

    CONTACT_PUSH(3, RefEntityEnum.CONTACT_ENTITY.getCode(), PushTypeEnum.CONTACT_PUSH.getCode(), PushTypeEnum.CONTACT_PUSH.getSubCode(), PushTypeEnum.CONTACT_PUSH.getName(), PushTypeEnum.CONTACT_PUSH.getAlias()),

    CUSTOMER_STAGE(3, RefEntityEnum.CUSTOMER_STAGE.getCode(), PushTypeEnum.CUSTOMER_STAGE.getCode(), PushTypeEnum.CUSTOMER_STAGE.getSubCode(), PushTypeEnum.CUSTOMER_STAGE.getName(), PushTypeEnum.CUSTOMER_STAGE.getAlias()),

    PURCHASE_PUSH(3, RefEntityEnum.PURCHASE_ENTITY.getCode(), PushTypeEnum.PURCHASE_PUSH.getCode(), PushTypeEnum.PURCHASE_PUSH.getSubCode(), PushTypeEnum.PURCHASE_PUSH.getName(), PushTypeEnum.PURCHASE_PUSH.getAlias()),
    WAIT_PURCHASE_PUSH(3, RefEntityEnum.PURCHASE_ENTITY.getCode(), PushTypeEnum.WAIT_PURCHASE_PUSH.getCode(), PushTypeEnum.WAIT_PURCHASE_PUSH.getSubCode(), PushTypeEnum.WAIT_PURCHASE_PUSH.getName(), PushTypeEnum.WAIT_PURCHASE_PUSH.getAlias()),

    INSTOCK_PUSH(3, RefEntityEnum.INSTOCK_ENTITY.getCode(), PushTypeEnum.INSTOCK_PUSH.getCode(), PushTypeEnum.INSTOCK_PUSH.getSubCode(), PushTypeEnum.INSTOCK_PUSH.getName(), PushTypeEnum.INSTOCK_PUSH.getAlias()),
    WAIT_INSTOCK_PUSH(3, RefEntityEnum.INSTOCK_ENTITY.getCode(), PushTypeEnum.WAIT_INSTOCK_PUSH.getCode(), PushTypeEnum.WAIT_INSTOCK_PUSH.getSubCode(), PushTypeEnum.WAIT_INSTOCK_PUSH.getName(), PushTypeEnum.WAIT_INSTOCK_PUSH.getAlias()),

    OUTSTOCK_PUSH(3, RefEntityEnum.OUTSTOCK_ENTITY.getCode(), PushTypeEnum.OUTSTOCK_PUSH.getCode(), PushTypeEnum.OUTSTOCK_PUSH.getSubCode(), PushTypeEnum.OUTSTOCK_PUSH.getName(), PushTypeEnum.OUTSTOCK_PUSH.getAlias()),
    WAIT_OUTSTOCK_PUSH(3, RefEntityEnum.OUTSTOCK_ENTITY.getCode(), PushTypeEnum.WAIT_OUTSTOCK_PUSH.getCode(), PushTypeEnum.WAIT_OUTSTOCK_PUSH.getSubCode(), PushTypeEnum.WAIT_OUTSTOCK_PUSH.getName(), PushTypeEnum.WAIT_OUTSTOCK_PUSH.getAlias()),

    SUPPLIER_PUSH(3, RefEntityEnum.SUPPLIER_ENTITY.getCode(), PushTypeEnum.SUPPLIER_PUSH.getCode(), PushTypeEnum.SUPPLIER_PUSH.getSubCode(), PushTypeEnum.SUPPLIER_PUSH.getName(), PushTypeEnum.SUPPLIER_PUSH.getAlias()),

    INVOICE_PUSH(3, RefEntityEnum.INVOICE_ENTITY.getCode(), PushTypeEnum.INVOICE_PUSH.getCode(), PushTypeEnum.INVOICE_PUSH.getSubCode(), PushTypeEnum.INVOICE_PUSH.getName(), PushTypeEnum.INVOICE_PUSH.getAlias()),
    INVOICE_ADD_PUSH(3, RefEntityEnum.INVOICE_ENTITY.getCode(), PushTypeEnum.INVOICE_ADD_PUSH.getCode(), PushTypeEnum.INVOICE_ADD_PUSH.getSubCode(), PushTypeEnum.INVOICE_ADD_PUSH.getName(), PushTypeEnum.INVOICE_INVALIDATION.getAlias()),
    INVOICE_RED_ADD_PUSH(3, RefEntityEnum.RED_INVOICE.getCode(), PushTypeEnum.INVOICE_RED_ADD_PUSH.getCode(), PushTypeEnum.INVOICE_RED_ADD_PUSH.getSubCode(), PushTypeEnum.INVOICE_RED_ADD_PUSH.getName(), PushTypeEnum.INVOICE_RED_ADD_PUSH.getAlias()),
    INVOICE_DEL_PUSH(3, RefEntityEnum.INVOICE_ENTITY.getCode(), PushTypeEnum.INVOICE_DEL_PUSH.getCode(), PushTypeEnum.INVOICE_DEL_PUSH.getSubCode(), PushTypeEnum.INVOICE_DEL_PUSH.getName(), PushTypeEnum.INVOICE_DEL_PUSH.getAlias()),
    INVOICE_REDUCTION_PUSH(3, RefEntityEnum.INVOICE_ENTITY.getCode(), PushTypeEnum.INVOICE_REDUCTION.getCode(), PushTypeEnum.INVOICE_REDUCTION.getSubCode(), PushTypeEnum.INVOICE_REDUCTION.getName(), PushTypeEnum.INVOICE_REDUCTION.getAlias()),
    INVOICE_INVALIDATION_PUSH(3, RefEntityEnum.INVOICE_ENTITY.getCode(), PushTypeEnum.INVOICE_INVALIDATION.getCode(), PushTypeEnum.INVOICE_INVALIDATION.getSubCode(), PushTypeEnum.INVOICE_INVALIDATION.getName(), PushTypeEnum.INVOICE_INVALIDATION.getAlias()),

    PURCHASE_INVOICE_PUSH(3, RefEntityEnum.PURCHASE_INVOICE_ENTITY.getCode(), PushTypeEnum.PURCHASE_INVOICE_PUSH.getCode(), PushTypeEnum.PURCHASE_INVOICE_PUSH.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_PUSH.getName(), PushTypeEnum.PURCHASE_INVOICE_PUSH.getAlias()),
    PURCHASE_INVOICE_ADD_PUSH(3, RefEntityEnum.PURCHASE_INVOICE_ENTITY.getCode(), PushTypeEnum.PURCHASE_INVOICE_ADD_PUSH.getCode(), PushTypeEnum.PURCHASE_INVOICE_ADD_PUSH.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_ADD_PUSH.getName(), PushTypeEnum.PURCHASE_INVOICE_ADD_PUSH.getAlias()),
    PURCHASE_INVOICE_RED_ADD_PUSH(3, RefEntityEnum.RED_PURCHASE_INVOICE.getCode(), PushTypeEnum.PURCHASE_INVOICE_RED_ADD_PUSH.getCode(), PushTypeEnum.PURCHASE_INVOICE_RED_ADD_PUSH.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_RED_ADD_PUSH.getName(), PushTypeEnum.PURCHASE_INVOICE_RED_ADD_PUSH.getAlias()),
    PURCHASE_INVOICE_DEL_PUSH(3, RefEntityEnum.PURCHASE_INVOICE_ENTITY.getCode(), PushTypeEnum.PURCHASE_INVOICE_DEL_PUSH.getCode(), PushTypeEnum.PURCHASE_INVOICE_DEL_PUSH.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_DEL_PUSH.getName(), PushTypeEnum.PURCHASE_INVOICE_DEL_PUSH.getAlias()),
    PURCHASE_INVOICE_REDUCTION_PUSH(3, RefEntityEnum.PURCHASE_INVOICE_ENTITY.getCode(), PushTypeEnum.PURCHASE_INVOICE_REDUCTION.getCode(), PushTypeEnum.PURCHASE_INVOICE_REDUCTION.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_REDUCTION.getName(), PushTypeEnum.PURCHASE_INVOICE_REDUCTION.getAlias()),
    PURCHASE_INVOICE_INVALIDATION_PUSH(3, RefEntityEnum.PURCHASE_INVOICE_ENTITY.getCode(), PushTypeEnum.PURCHASE_INVOICE_INVALIDATION.getCode(), PushTypeEnum.PURCHASE_INVOICE_INVALIDATION.getSubCode(), PushTypeEnum.PURCHASE_INVOICE_INVALIDATION.getName(), PushTypeEnum.PURCHASE_INVOICE_INVALIDATION.getAlias()),


    SIGN_IN_ADD_PUSH(3, RefEntityEnum.SIGN_IN.getCode(), PushTypeEnum.SIGN_IN_ADD_PUSH.getCode(), PushTypeEnum.SIGN_IN_ADD_PUSH.getSubCode(), PushTypeEnum.SIGN_IN_ADD_PUSH.getName(), PushTypeEnum.SIGN_IN_ADD_PUSH.getAlias()),

    BOMBILL_PUSH(3, RefEntityEnum.BOM_ENTITY.getCode(), PushTypeEnum.BOMBILL_PUSH.getCode(), PushTypeEnum.BOMBILL_PUSH.getSubCode(), PushTypeEnum.BOMBILL_PUSH.getName(), PushTypeEnum.BOMBILL_PUSH.getAlias()),

    PRODUCTION_ORDER_PUSH(3, RefEntityEnum.PRODUCTION_ORDER_ENTITY.getCode(), PushTypeEnum.PRODUCTION_ORDER_PUSH.getCode(), PushTypeEnum.PRODUCTION_ORDER_PUSH.getSubCode(), PushTypeEnum.PRODUCTION_ORDER_PUSH.getName(), PushTypeEnum.PRODUCTION_ORDER_PUSH.getAlias()),

    QUOTATION_PUSH(3, RefEntityEnum.QUOTATION.getCode(), PushTypeEnum.QUOTATION_PUSH.getCode(), PushTypeEnum.QUOTATION_PUSH.getSubCode(), PushTypeEnum.QUOTATION_PUSH.getName(), PushTypeEnum.QUOTATION_PUSH.getAlias()),


    DATA_CENTER_PUSH(3, RefEntityEnum.DATA_CENTER.getCode(), PushTypeEnum.DATA_CENTER_PUSH.getCode(), PushTypeEnum.DATA_CENTER_PUSH.getSubCode(), PushTypeEnum.DATA_CENTER_PUSH.getName(), PushTypeEnum.DATA_CENTER_PUSH.getAlias()),
    DATA_WARNING_PUSH(3, RefEntityEnum.DATA_WARNING.getCode(), PushTypeEnum.DATA_WARNING_PUSH.getCode(), PushTypeEnum.DATA_WARNING_PUSH.getSubCode(), PushTypeEnum.DATA_WARNING_PUSH.getName(), PushTypeEnum.DATA_WARNING_PUSH.getAlias()),
    DISTRIBUTOR_CONTACT_PUSH(3, RefEntityEnum.DISTRIBUTOR_CONTACT_ENTITY.getCode(), PushTypeEnum.DISTRIBUTOR_CONTACT_PUSH.getCode(), PushTypeEnum.DISTRIBUTOR_CONTACT_PUSH.getSubCode(), PushTypeEnum.DISTRIBUTOR_CONTACT_PUSH.getName(), PushTypeEnum.DISTRIBUTOR_CONTACT_PUSH.getAlias()),

    /**
     * level 4 特殊处理类型 退回公海池
     */
    CUSTOMER_BACK_PUSH(4, RefEntityEnum.CUSTOMER_BACK_REMIND.getCode(), PushTypeEnum.CUSTOMER_BACK_PUSH.getCode(), PushTypeEnum.CUSTOMER_BACK_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_BACK_PUSH.getName(), PushTypeEnum.CUSTOMER_BACK_PUSH.getAlias()),
    CUSTOMER_WILL_BACK_PUSH(4, RefEntityEnum.CUSTOMER_BACK_REMIND.getCode(), PushTypeEnum.CUSTOMER_WILL_BACK_PUSH.getCode(), PushTypeEnum.CUSTOMER_WILL_BACK_PUSH.getSubCode(), PushTypeEnum.CUSTOMER_WILL_BACK_PUSH.getName(), PushTypeEnum.CUSTOMER_WILL_BACK_PUSH.getAlias()),
    QUOTATION_REMIND(4, RefEntityEnum.QUOTATION_REMIND.getCode(), PushTypeEnum.QUOTATION_REMIND.getCode(), PushTypeEnum.QUOTATION_REMIND.getSubCode(), PushTypeEnum.QUOTATION_REMIND.getName(), PushTypeEnum.QUOTATION_REMIND.getAlias()),
    //sfa比较特殊,对应的refEntity为25, type为3/4/6/14,分别对应各个业务,特殊处理
//    SFA_PUSH(4, RefEntityEnum.SFA.getCode(), ),
    CLUE_REMIND(4,RefEntityEnum.CLUE_ENTITY.getCode(),PushTypeEnum.CLUE_PUSH.getCode(), PushTypeEnum.CLUE_PUSH.getSubCode(),PushTypeEnum.CLUE_PUSH.getName(),PushTypeEnum.CLUE_PUSH.getAlias()),
    CLUE_WILL_BACK_PUSH(4,RefEntityEnum.CLUE_BACK_REMIND.getCode(),PushTypeEnum.CLUE_WILL_BACK_PUSH.getCode(), PushTypeEnum.CLUE_WILL_BACK_PUSH.getSubCode(),PushTypeEnum.CLUE_WILL_BACK_PUSH.getName(),PushTypeEnum.CLUE_WILL_BACK_PUSH.getAlias()),

    /**
     * 位置类型
     */
    UNKNOWN(9, RefEntityEnum.UNKNOWN.getCode(), PushTypeEnum.UNKNOWN.getCode(), PushTypeEnum.UNKNOWN.getSubCode(), PushTypeEnum.UNKNOWN.getName(), PushTypeEnum.UNKNOWN.getAlias())
    ;
    private final int level;
    private final int refEntity;
    private final int type;
    private final int subType;
    private final String name;
    private final String alias;

    PushTypeLevelEnum(int level, int refEntity, int type, int subType, String name, String alias) {
        this.level = level;
        this.refEntity = refEntity;
        this.type = type;
        this.subType = subType;
        this.name = name;
        this.alias = alias;
    }

    public int getLevel() {
        return level;
    }

    public int getRefEntity() {
        return refEntity;
    }

    public int getType() {
        return type;
    }

    public int getSubType() {
        return subType;
    }

    public String getName() {
        return name;
    }

    public String getAlias() {
        return alias;
    }

    public static List<PushTypeLevelEnum> getAllEnumByLevel(Integer level) {
        List<PushTypeLevelEnum> list = new ArrayList<>();
        for (PushTypeLevelEnum cache : values()) {
            if (Objects.equals(level, cache.getLevel())) {
                list.add(cache);
            }
        }
        return list;
    }

    public static List<PushTypeLevelEnum> getEnumByTypes(Integer refEntity , Integer type, Integer subType) {
        List<PushTypeLevelEnum> list = new ArrayList<>();
        for (PushTypeLevelEnum cache : values()) {
            if (Objects.equals(refEntity, cache.getRefEntity())) {
                if (Objects.equals(type, cache.getType())) {
                    if (Objects.equals(subType, cache.getSubType())) {
                        list.add(cache);
                    }
                }
            }
        }
        return list;
    }

    public static List<PushTypeLevelEnum> getAllEnum() {
        List<PushTypeLevelEnum> list = new ArrayList<>();
        for (PushTypeLevelEnum cache : values()) {
            if (cache == UNKNOWN) {
                continue;
            }
            list.add(cache);
        }
        return list;
    }

}
